home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
5_6.lha
/
5_6
/
5_6A.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-08
|
561b
|
29 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ Exercise 5.6, part 1
/ Implement a character queue using a linked list.
/ <char_queue.h>
ifndef CHAR_QUEUE_H
define CHAR_QUEUE_H
lass char_queue
struct cQtable
{
char c;
struct cQtable *next;
} *rear, *front;
ublic:
char_queue(int nummembers);
~char_queue();
void enqueue(char s);
char dequeue();
int emptyQ() { return (front == 0); }
void clearQ();
;
endif /* CHAR_QUEUE_H */